#ifndef CUSTOMORDERDISPATCH_H
#define CUSTOMORDERDISPATCH_H
#include <string>
#include <QTime>
#include <QQueue>
#include <QMutex>
#include "generaldefine.h"

class CustomOrderDispatch
{
public:
    CustomOrderDispatch();
public:
    int addOrder(const OrderInfo orderIn,long long &orderSerialOut);
    int clearAllOrder();
    int clearOneOrder(long long &orderSerialOut);

private:
    int orderProcess();
    int findCar(QString &ipAddress);

private:
    QQueue<OrderInfo> order_raw;
    QQueue<OrderAllInfo*> allOrderInfo;
    QMutex orderMutex;

};

#endif // CUSTOMORDERDISPATCH_H
